1. Field of the Invention
The invention relates to apparatus, method, and program for recording and, more particularly, to techniques suitably applied, for example, to a disc camcorder using an optical disc as a recording medium.
2. Description of the Related Art
As one known type of disc camcorder, there is a disc camcorder using a DVD+R (Digital Versatile Disc+Recordable) as a recording medium. The DVD+R does not permit rewriting of data but enables multisession recording. In this type of disc camcorder, the recording region of an optical disc is divided into one or more sessions. Each session is divided into plural regions, known as fragments. In each fragment, data is recorded in ECC blocks each including plural sectors (e.g., 16 sectors from sector 0 to sector 15).
Therefore, when data is recorded in each fragment in multiple sessions, the finally recorded address (i.e., the address of the final sector in the final ECC block where data is recorded) in the immediately previous recording operation is detected. An address next to the finally recorded address is taken as a recording start address. In this case, addresses are in units of sectors. Data is recorded in ECC blocks from the recording start address. In the following description, the number of session is set to 1. In this case, closing the session is the same meaning as finalizing.
This method of recording is described in detail regarding the management data structure for the DVD+R, processing for making preparations for recording to be performed before data is recorded on the DVD+R, and a procedure to be performed to record data on the DVD+R in practice. These structure, processing, and procedure are described separately. First, the management data structure for the DVD+R on which data will be recorded is described. As shown in FIG. 10, the DVD+R has an ADIP (address in pre-groove) and a main area providing recording areas for various kinds of data. In the ADIP, PFI (physical format information) including information indicating the disc type (i.e., DVD+R), the finally recordable address, and information necessary during recording has been previously recorded.
Of these regions, the main area is composed of (i) an inner drive area that is a disc management area, (ii) a lead-in zone added to the head of the session, and (iii) a data zone in which image data acquired by an imaging technique is recorded. These area and zones are arranged in this order from the inner side of the DVD+R. Of these zones, the inner drive area is composed of (i) an initial zone in which data is not recorded at all, (ii) a disc test zone used as a tentative writing region for OPC (optimum power control), (iii) a disc count zone that is a region indicating the state in which the disc test zone is used, and (iv) a TOC zone in which TOC (table of contents) information is recorded.
The lead-in zone of the main area includes a disc ID (IDentification) zone and a control data zone. Of these zones, SDCB (session disc control blocks) information indicating the start address and end address of the session declared to be used from the host side (i.e., the control system of the disc camcorder) is recorded in the disc ID zone. PFI information created based on information obtained from ADIP when finalizing is done to permit an ordinary DVD player to play the DVD+R is recorded in the control data zone.
As shown in FIG. 11, the data zone of the main area is divided into plural fragments Fr. In each fragment Fr, data is recorded in successive ECC blocks each including 16 sectors. In the example of FIG. 11, the data zone is divided into three fragments, i.e., Fr1, Fr2, and Fr3.
As an example, it is assumed that the optical disc is not yet finalized and that the fragments Fr of sessions declared to be used from the host side are fragments Fr1 and Fr2. It follows that the start and end addresses of the fragment Fr1 and the start and end addresses of the fragment Fr2 are recorded in the SDCB information. The region located behind the final fragment Fr2 shown in the SDCB information is separately managed as the final fragment Fr3 on the side of the drive. As such, the disc camcorder can use the final fragment Fr3 not shown in the SDCB information as a data recorded region. Incidentally, if the disc is finalized in this state, the start and end addresses of the final fragment Fr3 are also recorded in the SDCB information.
The processing for making preparations for recording to be performed before data is recorded on the optical disc by the disc camcorder when the disc is inserted into the camcorder is next described. This processing for making preparations for recording is performed by the control portion of the disc camcorder. It is assumed that the inserted optical disc is a DVD+R having the aforementioned data management structure. As illustrated in the flowchart of FIG. 12, the control portion of the disc camcorder first goes to step SP1 when processing RT1 for making preparations for recording is started. In the step SP1, if insertion of the optical disc is recognized, the control portion proceeds to the next step SP2.
In step SP2, the control portion identifies the type of the inserted optical disc. In this case, the control portion determines that the type is the DVD+R and goes to the next step SP3. In step SP3, the control portion obtains PFI information from the inserted DVD+R. In this case, the control portion first attempts to read the PFI information from the control data zone of the DVD+R. If the attempt fails, the control portion attempts to read the PFI information from the ADIP and derives the PFI information. If the attempt to derive the PFI information fails, this procedure RT1 of processing for making preparations for recording is terminated with error. If the attempt to acquire the PFI information succeeds, the control portion checks the results of the identification in the previous step 2 based on the type of the disc contained in the PFI information, and then goes to the next step SP4.
In step SP4, the control portion adjusts the servo of the optical pickup. After the adjustment, the control portion obtains TOC information from the TOC zone of the optical disc and acquires disc ID information and SDCB information from the disc ID zone in the subsequent steps SP5-SP6. Then, the control portion goes to the next step SP7.
In step SP7, the control portion executes the processing for obtaining the finally recorded address as a subroutine, the processing being typically needed to record additional data. A procedure of processing for obtaining the finally recorded address is described by referring to the flowchart of FIG. 13, the processing being executed in this step SP7. The control portion first proceeds to step SP10 if the procedure RT2 of processing for obtaining the finally recorded address is started. In the step SP10, the control portion makes a decision as to whether the inserted optical disc has been finalized.
If the decision at the step SP10 is negative (No), it means that the final fragment Fr (e.g., fragment Fr3) is present behind the fragments Fr (e.g., fragments Fr1 and Fr2) shown in the SDCB information. At this time, the control portion goes to step SP11. In this step SP11, the control portion identifies the final fragment Fr3. That is, the control portion takes the address next to the final address of the rearmost fragment Fr2 recorded in the SDCB information as the start address of the final fragment Fr3 (in this case, addresses are represented in sectors). Also, the control portion identifies the final fragment Fr3 while taking the finally recordable address obtained from the PFI information as an end address. The control portion proceeds to the next step SP12.
Meanwhile, if the decision at step SP10 is affirmative (Yes), it means that the start and end addresses of all the fragments Fr including the final fragment Fr3 are recorded in the SDCB information because the inserted optical disc has been finalized. At this time, the control portion determines that it is not necessary to identify the final fragment Fr3. The control portion then goes to step SP12.
In step SP12, the control portion detects the rearmost address at which an RF (radio-frequency) signal is recorded as the finally recorded address LWA of each fragment Fr as shown in FIG. 14 by detecting the presence or absence of the RF signal between the start address and end address in each sector for all the fragments Fr. Then, the control portion goes to the next step SP13. At this time, the control portion detects the presence or absence of the RF signal using a sector synchronization signal.
In step SP13, the control portion makes a decision as to whether the finally recorded address LWA has been normally detected from each fragment Fr in the previous step SP12. If the decision at the step SP13 is negative, it means that error occurs in detecting the finally recorded address LWA. In this case, the control portion terminates the procedure RT2 of processing for obtaining the finally recorded address with error. On the other hand, if the decision at the step SP13 is affirmative, the control portion determines that the finally recorded address LWA has been normally detected from each fragment Fr. Then, control portion proceeds to step SP14.
In step SP14, the control portion makes a decision for each fragment Fr as to whether the finally recorded address LWA is the end address of the fragment Fr. If the decision at the step SP14 is negative, it means that there is a region on which more data can be recorded in the fragment Fr. At this time, the control portion goes to step SP15. As illustrated in FIG. 14, the recording start address NWA is set as an address next to the finally recorded address LWA. On the other hand, if the decision at the step SP 14 is affirmative, it means that the finally recorded address LWA of the fragment Fr is the end address, i.e., no further data can be recorded in the fragment Fr. At this time, the control portion sets the recording start address NWA at 0, which does not exist as an address. This means that additional data cannot be recorded in the fragment Fr. After the recording start address NWA is set for each fragment Fr in this way, the control portion ends the procedure RT2 of processing for obtaining the finally recorded address.
After the processing for obtaining the finally recorded address is executed in the step SP7 in this way, the control portion goes to the next step SP8 (FIG. 12). In this step SP8, the control portion searches for a disc test zone (DIT) used as a tentatively written region during OPC. The optical pickup is made to be on standby at that location. The procedure RT1 of processing for making preparations for recording is ended.
Preparations for starting recording of data on the inserted DVD+R are completed by executing the processing for making preparations for recording as described above.
When data is recorded on the DVD+R in practice, the control portion of the disc camcorder starts recording of data from the recording start address NWA obtained by the above-described processing for making preparations for recording. That is, when data is recorded, for example, in the fragment Fr2, data is recorded in each ECC block from the recording start address NWA2 (in this case, the address of the head sector of the (n+1)th ECC block) as shown in FIG. 14.
In this type of disc camcorder, it is stipulated that data be recorded in ECC blocks in succession as described previously and so when recording of data is ended at an intermediate point of an ECC block because of power failure occurring, for example, during data recording, data is not recorded in successive ECC blocks. Subsequently, data cannot be appended in multiple sessions.
Accordingly, a method of recording as shown in FIG. 15 has been heretofore proposed (see, for example, JP-A-2004-62947 (patent document 1) ). In particular, when data is appended, for example, to fragment Fr2 in multiple sessions, if the detected finally recorded address LWA2 in the latest session does not indicate the final sector (sector 15) in the ECC block, i.e., the finally recorded address LWA2 in the previous session indicates an intermediate sector (sector 0 to sector 14) of the ECC block, it is determined that the previous data recording was terminated at an intermediate point of the ECC block (in this case, (n+1)th ECC block). Dummy data is added to this ECC block, making an amendment. That is, data is recorded in ECC blocks. Data (hereinafter referred to as the non-dummy data to be discriminated from dummy data) can be again appended in multiple sessions from the ECC block next to that ECC block. The dummy data cannot be read out during reading.